package com.mark.killy;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;


/**
 * APP 启动页
 */
public class MainActivity extends AppCompatActivity {

    //设置进入系统的时间，1000=1s
    private  final int SPLASH_DISPLAY_LENGHT = 1300;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

            //  无title
            requestWindowFeature(Window.FEATURE_NO_TITLE);
             getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
           //全屏
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
            //隐藏标题栏
            ActionBar actionBar = getSupportActionBar();
            actionBar.hide();

        setContentView(R.layout.activity_start_main);


        //在MainActivity停留2秒然后进入LoginActivity页面
        new android.os.Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent mainIntent = new Intent(MainActivity.this, activity_login_formActivity.class);
                MainActivity.this.startActivity(mainIntent);
                MainActivity.this.finish();
            }
        },SPLASH_DISPLAY_LENGHT);

    }

}
